<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
	       <title><?php if (isset($title)){echo $title;}?></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- basic styles -->
                 <base href="<?php echo base_url() ?>" />
		<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="assets/css/font-awesome.min.css" />
		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="assets/css/chosen.css" />
		<link rel="stylesheet" href="assets/css/datepicker.css" />
		<link rel="stylesheet" href="assets/css/bootstrap-timepicker.css" />
		<link rel="stylesheet" href="assets/css/daterangepicker.css" />
		<link rel="stylesheet" href="assets/css/colorpicker.css" />
		<!-- fonts -->
		<!--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" /> -->
		<!-- ace styles -->
		<link rel="stylesheet" href="assets/css/ace.min.css" />
		<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="assets/css/ace-skins.min.css" />
		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<!-- inline styles related to this page -->
		<!-- ace settings handler -->
		<script src="assets/js/ace-extra.min.js"></script>
		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!--[if lt IE 9]>
		<script src="assets/js/html5shiv.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body>

		<div class="navbar navbar-default " id="navbar">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>
			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">                               
					<a href="<?php echo site_url(); ?>" class="navbar-brand">
                                            <img src="assets/avatars/logo.gif" alt="logo"  height="26" border="0" class="nav-user-photo" />
						<small>							
                                                    <img src="assets/avatars/title.png" alt="title"  height="26" border="0" class="nav-user-photo" />						</small>					</a><!-- /.brand -->
				</div>
				<!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">
                                            <li class="grey">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-tasks"></i>
								<span class="badge badge-grey"><?php if (isset($sum1)){echo $sum1;}else{echo "0";}?></span>
							</a>

							<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
								<li class="dropdown-header">
									<i class="icon-ok"></i>
									还有<?php if (isset($sum1)){echo $sum1;}else{echo "0";}?>个任务完成
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">待办工单</span>
											<span class="pull-right"><?php if (isset($sum1)){echo $sum1;}else{echo "0";}?>个</span>
										</div>
									</a>
								</li>		
								<li>
									<a href="#">
										查看工单详情
										<i class="icon-arrow-right"></i>
									</a>
								</li>
							</ul>
						</li>
						<li class="light-blue">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<i class="icon-user bigger-230"></i>
								<span class="user-info">
									<small>欢迎你,</small>
									<?php if (isset($Loginname)){echo $Loginname;}else{echo "用户";}?>
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a href="<?php echo site_url('main/mysetting'); ?>">
										<i class="icon-cog"></i>
										设置
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/myinfo'); ?>">
										<i class="icon-user"></i>
										个人资料
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="<?php echo site_url('main/logout'); ?>">
										<i class="icon-off"></i>
										退出
									</a>
								</li>
							</ul>
						</li>
					</ul><!-- /.ace-nav -->
				</div><!-- /.navbar-header -->
			</div><!-- /.container -->
		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
					</script>

					
					<ul class="nav nav-list">
                                            	<li>
							<a href="<?php echo site_url(); ?>">
								<i class=" icon-home "></i>
								<span class="menu-text"> 系统首页 </span>
							</a>
						</li>    

                                            <li class="active open">
							<a href="#" class="dropdown-toggle">
								<i class="icon-legal"></i>
								<span class="menu-text"> 任务工单</span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
                                                             <li class="active">
									<a href="<?php echo site_url('main/createWorkOrders/1/1_1'); ?>">
										<i class="icon-double-angle-right"></i>
										工程入场申请
									</a>
								</li>	
								<li >
									<a href="<?php echo site_url('main/createWorkOrders/2//2_1'); ?>">
										<i class="icon-double-angle-right"></i>
										工程退场申请                                                                                                                                                          
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/createWorkOrders/3/3_1'); ?>">
										<i class="icon-double-angle-right"></i>
										验收交维申请
									</a>
								</li>		
                                                                                                                               <li>
									<a href="<?php echo site_url('main/caogao'); ?>">
										<i class="icon-double-angle-right"></i>
										我的草稿工单
                                                                                 <span class="badge badge-primary "><?php if (isset($sum2)){echo $sum2;}else{echo "0";}?></span>
									</a>
								</li>	
							</ul>
						</li>
						<li>
							<a href="#" class="dropdown-toggle">
								<i class="icon-dashboard"></i>
								<span class="menu-text"> 我的工单</span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
								<li >
									<a href="<?php echo site_url('main/mydaiban'); ?>">
										<i class="icon-double-angle-right"></i>
										我的待办工单
                                                                                  <span class="badge badge-primary "><?php if (isset($sum1)){echo $sum1;}else{echo "0";}?></span>
                                                                              
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/myyiban'); ?>">
										<i class="icon-double-angle-right"></i>
										我的己办工单
									</a>
								</li>		
                                                                <li>		
									<a href="<?php echo site_url('main/myguidang'); ?>">
										<i class="icon-double-angle-right"></i>
										我的归档工单
									</a>
								</li>	
							</ul>
						</li>
                                                <li>
							<a href="#" class="dropdown-toggle">
									<i class=" icon-desktop"></i>
								<span class="menu-text"> 系统工单</span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
								<li>
									<a href="<?php echo site_url('main/sys_noguidang'); ?>">
										<i class="icon-double-angle-right"></i>
										未归档工单
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/sys_guidang'); ?>">
										<i class="icon-double-angle-right"></i>
										己归档工单
									</a>
								</li>
                                                                <li>
								<a href="<?php echo site_url('main/sys_allWork'); ?>">
										<i class="icon-double-angle-right"></i>
										全部系统工单
									</a>
								</li>
							</ul>
						</li>
						<li>
							<a href="#" class="dropdown-toggle">
								<i class="icon-cog"></i>
								<span class="menu-text"> 系统设置 </span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
                                                            <li>
									<a href="<?php echo site_url('main/myinfo'); ?>">
										<i class="icon-double-angle-right"></i>
										个人信息
									</a>
								</li>
								<li>
									<a href="<?php echo site_url('main/editpw'); ?>">
										<i class="icon-double-angle-right"></i>
										密码修改
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/mysetting'); ?>">
										<i class="icon-double-angle-right"></i>
										角色配置
									</a>
								</li>

								<li>
									<a href="<?php echo site_url('main/users'); ?>">
										<i class="icon-double-angle-right"></i>
										公共通信录
									</a>
								</li>
							</ul>
						</li>
					</ul><!-- /.nav-list -->

					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
					</div>
					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
					</script>
				</div>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">首页</a>
							</li>
							<li class="active">创建工单</li>
						</ul><!-- .breadcrumb -->

						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- #nav-search -->
					</div>
					<div class="page-content">                                           
						<!--this add.............-->
                                              <div class="row">

									<div class="col-xs-12">
										<div class="tabbable">
											<ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab">
											<?php if (isset($tabconfig)){
                                                                                            if($tabconfig==""){
                                                                                               echo "流程配置不存在";        
                                                                                            }else{
                                                                                            echo $tabconfig; }                                                                                           
                                                                                        }else{
                                                                                            echo "流程配置错误";                                                                                           
                                                                                            }?>	
											</ul>

										<div class="tab-content">
										       <div id="tab_1_1_1" class="tab-pane">
                                                                                           <div>
                                                                                              <div class="alert alert-info " id="alert1" >
                                                                                                <button data-dismiss="alert" class="close" type="button">
                                                                                                        <i class="icon-remove"></i>
                                                                                                </button>
                                                                                                <strong>填写基本申请信息</strong>
                                                                                                <br>
										               </div>
                                                                                                 <form role="form_1_1_1" name="form_1_1_1" id="form_1_1_1" method="post"  class="form-horizontal" novalidate="novalidate"> 
                                                                                                        <div class="form-group">
                                                                                                            <label for="rname" class="control-label col-xs-12 col-sm-3 no-padding-right">站点（段落）名称:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                    <input type="hidden" name="fiid"id="fiid" value="" />
                                                                                                                    <input type="hidden" name="rid"id="rid" value="" />
                                                                                                                    <input type="hidden" name="prid"id="prid" value="" />
                                                                                                                    <input type="hidden" name="fsid"id="fsid" value="<?php if (isset($FSID)){echo $FSID;}?>" />
                                                                                                                    <input type="text" value="" class="col-xs-12 col-sm-6 valid" id="rname" name="rname" aria-required="true" aria-invalid="false"> 
                                                                                                                    &nbsp; &nbsp; &nbsp;<span class="middle text-danger" id="rname_auth">*</span>
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>
                                                                                                         <div class="form-group">
                                                                                                            <label for="username" class="control-label col-xs-12 col-sm-3 no-padding-right">申请人:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                    <input type="text" value="<?php if (isset($Loginname)){echo $Loginname;}?>" class="col-xs-12 col-sm-6 valid" id="username" name="username" aria-required="true" aria-invalid="false">
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>
                                                                                                        <div class="space-2"></div>      
                                                                                                            <div class="form-group">
                                                                                                            <label for="batch" class="control-label col-xs-12 col-sm-3 no-padding-right">申请批次:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                   <select class="col-xs-12 col-sm-6" id="batch" name="batch">
                                                                                                                       <option value="NULL">[请选择]</option>
                                                                                                                      <?php for ($i = 1; $i <= 20; $i++) {                                                                                                                      
                                                                                                                            $batch="第".$i."批次";
                                                                                                                            echo  "<option value=".$i.">".$batch."</option>";
                                                                                                                          }
                                                                                                                       ?>                                                                                                                    
                                                                                                                    </select> &nbsp; &nbsp; &nbsp;<span class="middle text-danger" id="batch_auth">*</span>
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>
                                                                                                        <div class="space-2"></div>   
                                                                                                        <div class="form-group">
                                                                                                            <label for="sys_group_id" class="control-label col-xs-12 col-sm-3 no-padding-right">分公司:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                    <select class="col-xs-12 col-sm-6" id="brid" name="brid"  >
                                                                                                                        <option value="NULL">[请选择]</option>
                                                                                                                        <?php
                                                                                                                            if (isset($branch)) {
                                                                                                                                foreach ($branch->result() as $row) :
                                                                                                                                   if($brid==$row->brid){
                                                                                                                                     echo "<option value='".$row->brid."' selected>".$row->brname ."</option>";
                                                                                                                                   }else{
                                                                                                                                      echo "<option value='".$row->brid."'>".$row->brname ."</option>";   
                                                                                                                                   }
                                                                                                                                endforeach;
                                                                                                                            }
                                                                                                                          ?>                                                                                                                                                                                                                                       
                                                                                                                    </select> &nbsp; &nbsp; &nbsp;<span class="middle text-danger" id="brid_auth">*</span>
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>
                                                                                                        <div class="form-group">
                                                                                                            <label for="truename" class="control-label col-xs-12 col-sm-3 no-padding-right ">手机号:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                    <input type="text" value="<?php if (isset($Tel)){echo $Tel;}?>" class="col-xs-12 col-sm-6" id="truename"  name="tel">
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <div class="space-2"></div>

                                                                                                        <div class="form-group">
                                                                                                            <label for="email" class="control-label col-xs-12 col-sm-3 no-padding-right"  >邮箱:</label>

                                                                                                            <div class="col-xs-12 col-sm-9">
                                                                                                                <div class="clearfix">
                                                                                                                    <input type="email" value="<?php if (isset($Email)){echo $Email;}?>" class="col-xs-12 col-sm-6" name="email" id="email" type="email" name="email">
                                                                                                                </div>
                                                                                                            </div>
                                                                                                        </div>
                                                                                                      <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-3 col-md-12">                                                                                                       
                                                                                                            <button type="button" class="btn btn-info"  id="save_1_1_1" onclick="">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                        存为草稿
                                                                                                                </button>

                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn  btn-danger " id="next_1_1_1">
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                      提交下一步
                                                                                                                </button>
                                                                                                        </div>
									                          </div>
                                                                                                    </form>
												</div>
                                                                                           </div>
												<div id="tab_1_1_2" class="tab-pane ">                                                                                                  
                                                                                                    <form class="definewidth m20" method="post" action="" name="form_1_1_2" id="form_1_1_2">
                                                                                                    <table class="table table-bordered table-hover table-condensed m10" >
                                                                                                        <tbody>
                                                                                                         <tr>
                                                                                                            <td class="tableleft" width="20%">项目编码：</td>
                                                                                                            <td>
                                                                                                                <input type="hidden" name="fiid2"id="fiid2" value="" />
                                                                                                                <input type="hidden" name="rid2"id="rid2" value="" />
                                                                                                                <input type="hidden" name="prid2"id="prid2" value="" />
                                                                                                                <input type="hidden" name="brid2"id="brid2" value="<?php if (isset($brid)){echo $brid;}?>" />
                                                                                                                <input type="hidden" name="fsid2"id="fsid2" value="<?php if (isset($FSID)){echo $FSID;}?>" />
                                                                                                                <input type="text" name="pcode" id="pcode" class="col-xs-3" placeholder="请点击选择.." readonly="true">													
                                                                                                                <a href="javascript:" class="btn btn-link" onclick="$('#pcode').val('')">
														<i class="icon-trash bigger-120 green"></i>
														清空项目
													     </a>
                                                                                                                <span  class="middle text-danger">*</span>
                                                                                                            </td>                                                            
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td class="tableleft">项目类型：</td>
                                                                                                             <td>
                                                                                                                <select name="ptype" class="col-xs-3" >
                                                                                                                 <option value="">[请选择]</option>  
                                                                                                                <option value="基站设备工程">基站设备工程</option>
                                                                                                                <option value="传输设备工程">传输设备工程</option>
                                                                                                                <option value="传输线路工程">传输线路工程</option> >
                                                                                                                <option value="传输管道工程">传输管道工程</option>
                                                                                                                </select><span  class="middle text-danger">*</span>
                                                                                                            </td>
                                                                                                           
                                                                                                        </tr>
                                                                                                         <tr>
                                                                                                            <td class="tableleft">施工单位：</td>
                                                                                                             <td>
                                                                                                                <select name="sgdw" class="col-xs-3" >
                                                                                                                    <option value="">[请选择]</option>
                                                                                                                        <?php
                                                                                                                            if (isset($nodes)) {
                                                                                                                                foreach ($nodes->result() as $row) :
                                                                                                                                 echo "<option value='".$row->name."'>".$row->name ."</option>";
                                                                                                                                endforeach;
                                                                                                                            }
                                                                                                                          ?>           
                                                                                                                </select><span  class="middle text-danger">*</span>
                                                                                                            </td>
                                                                                                           
                                                                                                        </tr>                                                                                                       
                                                                                                        <tr>
                                                                                                            <td class="tableleft">入场详细地址：</td>
                                                                                                            <td><input type="text" name="rcAddr"  class="col-xs-3"><span class="middle text-danger">*</span></td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td class="tableleft">现场随工人员：</td>
                                                                                                            <td><input type="text" name="xcsg" class="col-xs-3"><span  class="middle text-danger">*</span></td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td class="tableleft">现场监理人员：</td>
                                                                                                               <td><input type="text" name="xcjl" class="col-xs-3"><span  class="middle text-danger">*</span></td>
                                                                                                        </tr>  
                                                                                                         <tr>
                                                                                                            <td class="tableleft">现场施工队长：</td>
                                                                                                               <td><input type="text" name="xcsgd" class="col-xs-3"><span  class="middle text-danger">*</span></td>
                                                                                                        </tr> 
                                                                                                        <tr>
                                                                                                            <td class="tableleft">县市项目经理：</td>
                                                                                                               <td><input type="text" name="branchPm" class="col-xs-3"><span  class="middle text-danger">*</span></td>
                                                                                                        </tr> 
                                                                                                         <tr>
                                                                                                            <td class="tableleft">计划入退场日期：</td>
                                                                                                            <td>
                                                                                                                <input class="col-xs-3"    type="text" name="date-range-picker" id="id-date-range-picker-1" value="<?php ?>"  readonly="true" placeholder="请点击选择.."/><span  class="middle text-danger">*</span												            
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                         <tr>
                                                                                                            <td class="tableleft">工程主要建设内容：</td>
                                                                                                            <td><textarea rows="7" placeholder="" id="form-field-1" class="col-xs-6" name="mainProjectContent"></textarea><span  class="middle text-danger">*</span></td>
                                                                                                        </tr>  
                                                                                                         <tr>
                                                                                                            <td class="tableleft">工程准备情况及存在主要问题：</td>
                                                                                                               <td><textarea  rows="7" placeholder="" id="form-field-2" class="col-xs-6 " name="mainProjectReady"></textarea><span  class="middle text-danger">*</span></td>
                                                                                                        </tr>                                                                                                      
                                                                                                    </tbody></table>
                                                                                                        
                                                                                                      <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-2 col-md-12 ">
                                                                                                             <button type="button" class="btn   btn-danger" id="last_1_1_2">
                                                                                                                        <i class="icon-arrow-left bigger-110"></i>
                                                                                                                      返回上一步
                                                                                                                </button>
                                                                                                             &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn btn-info" id="save_1_1_2">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                        存为草稿
                                                                                                                </button>

                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                 <button type="button" class="btn btn-info"id="print_1_1_2">
                                                                                                                        <i class="icon-ok bigger-110"></i>
                                                                                                                        提交保存
                                                                                                                 </button>
                                                                                                                 &nbsp; &nbsp; &nbsp;
                                                                                                                 <a href="" class="btn btn-info"id="download_1_1_2">
                                                                                                                        <i class="icon-download-alt  bigger-110"></i>
                                                                                                                        下载打印
                                                                                                                 </a>

                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn   btn-danger" id="next_1_1_2"> 
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                      提交下一步
                                                                                                                </button>
                                                                                                        </div>
									                                </div>
                                                                                                    </form>
												</div>
														
								  <div id="tab_1_1_3" class="tab-pane  ">																						
                                                                           <div class="row">
									   <div class="col-xs-12">
										 <div class="table-responsive">
                                                                                     <div class="alert alert-block alert-success">
											<button data-dismiss="alert" class="close" type="button">
												
											</button>

											<p>
												<strong>
													<i class="icon-ok"></i>
													请选择文件上传.
												</strong>												
											</p>

											<p>
												<button id="files_browser" class="btn btn-sm btn-success">浏览文件</button>
												<button id="files_uploads" class="btn btn-sm btn-warning">全部上传</button>
											</p>
										</div>
                                                                                     <div class="table-header">
                                                                                         <i class=" icon-folder-close-alt bigger-120"></i>
											附件列表
										    </div>
                                                                                     <table class="table table-striped table-bordered table-hover" id="sample-table-1">
                                                                                            <thead class="">
													<tr>
														<th>文件类型</th>
                                                                                                                <th>文件名</th>
														<th class="hidden-480">文件大小</th>	
                                                                                                                <th>文件操作</th>
														<th class="hidden-480">上传进度</th>														
                                                                                                              
													</tr>
												</thead>
												<tbody id="files_lists">
												</tbody>
											</table>
										   </div>
									   </div><!-- /span -->
								    </div>
                                                                                         <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-3 col-md-9">
                                                                                                             <button type="button" class="btn   btn-danger"  id="last_1_1_3">
                                                                                                                        <i class="icon-arrow-left bigger-110"></i>
                                                                                                                      返回上一步
                                                                                                                </button>
                                                                                                             &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn btn-info"  id="save_1_1_3">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                        存为草稿
                                                                                                                </button>

                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                 <button type="button" class="btn btn-info"  id="print_1_1_3">
                                                                                                                        <i class="icon-print bigger-110"></i>
                                                                                                                        保存并打印
                                                                                                                </button>

                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn   btn-danger"  id="next_1_1_3">
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                      提交下一步
                                                                                                                </button>
                                                                                                        </div>
									                      </div>
												</div>
												<div id="tab_1_2" class="tab-pane">
                                                                                                <div class="alert alert-info">
                                                                                                <button type="button" class="close" data-dismiss="alert">
                                                                                                        <i class="icon-remove"></i>
                                                                                                </button>
                                                                                                <strong>填写基本审核意见</strong>
                                                                                                <br>
										               </div>
												<form class="definewidth m20" method="post" action="index.html">
                                                                                                    <table class="table table-bordered table-hover table-condensed m10">
                                                                                                        <tbody>
                                                                                                        <tr>
                                                                                                            <td width="20%" class="tableleft">审核意见:</td>
                                                                                                             <td><textarea class="col-xs-6 " id="form-field-2" placeholder="Default Text" rows="7"></textarea></td>                                                              
                                                                                                        </tr>
                                                                                                        </tbody>
                                                                                                    </table>   
                                                                                                </form>
                                                                                                     <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-3 col-md-9">
                                                                                                             <button type="button" class="btn   btn-danger">
                                                                                                                        <i class="icon-arrow-left bigger-110"></i>
                                                                                                                      退回上一步
                                                                                                                </button>
                                                                                                             &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn btn-info">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                       保存意见
                                                                                                                </button>                                                                                                              
                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn   btn-danger">
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                      提交下一步
                                                                                                                </button>
                                                                                                        </div>
									                      </div>
												</div>
												<div id="tab_1_3" class="tab-pane">
                                                                                                <div class="alert alert-info">
                                                                                                <button type="button" class="close" data-dismiss="alert">
                                                                                                        <i class="icon-remove"></i>
                                                                                                </button>
                                                                                                <strong>州公司项目经理确认</strong>
                                                                                                <br>
										               </div>
												<form class="definewidth m20" method="post" action="index.html">
                                                                                                    <table class="table table-bordered table-hover table-condensed m10">
                                                                                                        <tbody>
                                                                                                         <tr>
                                                                                                            <td width="20%" class="tableleft">领料人：:</td>
                                                                                                             <td><input type="text" class="col-xs-3" name="name"></td>                                                              
                                                                                                        </tr>
                                                                                                         <tr>
                                                                                                            <td width="20%" class="tableleft">领料日期:</td>
                                                                                                             <td>
                                                                                                                 <div class="row">
                                                                                                                     <div class="col-xs-8 col-sm-11">
                                                                                                                 <div class="input-group">
                                                                                                                     <span class="input-group-addon">
															<i class="icon-calendar bigger-110"></i>
														</span>
														  <input type="text" data-date-format="yyyy/mm/dd" id="id-date-picker-1" class=" date-picker col-xs-3 ">								
														</div>
                                                                                                              </div>
                                                                                                            </div>
                                                                                                             </td>                                                              
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td width="20%" class="tableleft">审核意见:</td>
                                                                                                             <td><textarea class="col-xs-6 " id="form-field-2" placeholder="Default Text" rows="7"></textarea></td>                                                              
                                                                                                        </tr>
                                                                                                        </tbody>
                                                                                                    </table>   
                                                                                                </form>
                                                                                                     <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-3 col-md-9">
                                                                                                             <button type="button" class="btn   btn-danger">
                                                                                                                        <i class="icon-arrow-left bigger-110"></i>
                                                                                                                      退回上一步
                                                                                                                </button>
                                                                                                             &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn btn-info">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                        保存意见
                                                                                                                </button>
                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn   btn-danger">
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                      提交下一步
                                                                                                                </button>
                                                                                                        </div>
									                      </div>
												</div>

												<div id="tab_1_4" class="tab-pane">
                                                                                                <div class="alert alert-info">
                                                                                                <button type="button" class="close" data-dismiss="alert">
                                                                                                        <i class="icon-remove"></i>
                                                                                                </button>
                                                                                                <strong>县市分公司到场确认</strong>
                                                                                                <br>
										               </div>
												<form class="definewidth m20" method="post" action="index.html">
                                                                                                    <table class="table table-bordered table-hover table-condensed m10">
                                                                                                        <tbody>
                                                                                                         <tr>                                                                                                             <tr>
                                                                                                            <td width="20%" class="tableleft">到场确认人：:</td>
                                                                                                             <td><input type="text" class="col-xs-3" name="name"></td>                                                              
                                                                                                        </tr>
                                                                                                         <tr>
                                                                                                            <td width="20%" class="tableleft">到场日期:</td>
                                                                                                             <td>
                                                                                                                 <div class="row">
                                                                                                                     <div class="col-xs-8 col-sm-11">
                                                                                                                 <div class="input-group">
                                                                                                                     <span class="input-group-addon">
															<i class="icon-calendar bigger-110"></i>
														</span>
														  <input type="text" data-date-format="yyyy/mm/dd" id="id-date-picker-2" class=" date-picker col-xs-3 ">								
														</div>
                                                                                                              </div>
                                                                                                            </div>
                                                                                                            </td>                                                                         
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td width="20%" class="tableleft">审核意见:</td>
                                                                                                             <td><textarea class="col-xs-6 " id="form-field-2" placeholder="Default Text" rows="7"></textarea></td>                                                              
                                                                                                        </tr>
                                                                                                        </tbody>
                                                                                                    </table>   
                                                                                                </form>
                                                                                                     <div class="clearfix form-actions">
                                                                                                        <div class="col-md-offset-3 col-md-9">
                                                                                                             <button type="button" class="btn   btn-danger" >
                                                                                                                        <i class="icon-arrow-left bigger-110"></i>
                                                                                                                      返回上一步
                                                                                                                </button>
                                                                                                             &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn btn-info">
                                                                                                                        <i class="icon-save bigger-110"></i>
                                                                                                                       保存意见
                                                                                                                </button>
                                                                                                                &nbsp; &nbsp; &nbsp;
                                                                                                                <button type="button" class="btn   btn-danger">
                                                                                                                        <i class="icon-arrow-right bigger-110"></i>
                                                                                                                     提交结束
                                                                                                                </button>
                                                                                                        </div>
									                      </div>
												</div>
                                                                                           <div id="tab_rc" class="tab-pane">
													<p>入场工单表</p>
											  </div>
                                                                                            <div id="tab_track" class="tab-pane">
													<p>流程跟踪</p>
											   </div>                                                                                      
											</div>
										</div>
									</div><!-- /span -->
								</div><!-- /row -->
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<table id="grid-table"></table>

								<div id="grid-pager"></div>

								<script type="text/javascript">
									var $path_base = "/";//this will be used in gritter alerts containing images
								</script>

								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
		<!-- basic scripts -->
		<!--[if !IE]> -->
		<script src="assets/js/jquery-2.0.3.min.js"></script>
		<!-- <![endif]-->
		<!--[if IE]>
                <script src=assets/js/jquery-1.10.2.min"></script>
                <![endif]-->
		<!--[if !IE]>
		<script type="text/javascript">
			window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>
		<![endif]-->
		<!--[if IE]>
                <script type="text/javascript">
                 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
                </script>
                <![endif]-->
		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>
                <script src="assets/js/date-time/bootstrap-datepicker.min.js"></script>
                <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="assets/js/chosen.jquery.min.js"></script>
		<script src="assets/js/fuelux/fuelux.spinner.min.js"></script>
                <script src="assets/js/bootstrap-modal.js"></script>      
		<script src="assets/js/date-time/moment.min.js"></script>
		<script src="assets/js/date-time/daterangepicker.min.js"></script>
		<script src="assets/js/bootstrap-colorpicker.min.js"></script>
		<script src="assets/js/jquery.knob.min.js"></script>
		<script src="assets/js/jquery.autosize.min.js"></script>
		<script src="assets/js/jquery.inputlimiter.1.3.1.min.js"></script>
		<script src="assets/js/jquery.maskedinput.min.js"></script>
		<script src="assets/js/bootstrap-tag.min.js"></script>
                <script src="assets/js/layer/layer.min.js"></script>
                <script src="assets/js/plupload/plupload.full.min.js"></script>
		<!-- ace scripts -->
		<script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>
                <script type="text/javascript">
                    /*
                    * 函数名:check_1_1_1();
                    * 功能：验证form1_1_1;
                    * 参数：无.
                    */
                var  check_1_1_1=function (){ 
                      if($("#rname").val()==""){
                       $('#rname_auth').html("<i class='icon-remove bigger-110 red'></i>保存前此项不能为空.");
                       $("#rname").focus();
                    }else{
                       if($("#batch").val()=="NULL"){
                               $('#batch_auth').html("<i class='icon-remove bigger-110 red'></i>保存前此项不能为空.");
                               $('#rname_auth').html("*");
                               $("#batch").focus();
                         }else{
                           if($("#brid").val()=="NULL"){
                                   $('#brid_auth').html("<i class='icon-remove bigger-110 red'></i>保存前此项不能为空.");
                                   $('#rname_auth').html("*");
                                   $('#batch_auth').html("*");
                                   $("#brid").focus();
                              }else{
                                $('#rname_auth').html("*");
                                $('#batch_auth').html("*");
                                $('#brid_auth').html("*"); 
                                return true;
                        }
                       }
                     }
                     return false;
                    }
                      /*
                    * 函数名:check_1_1_2();
                    * 功能：验证form1_1_2;
                    * 参数：无.
                    */
                var check_1_1_2=function(){
                    isPass = true;
                    $("#form_1_1_2 :input").not(':button').each(function(){  //查找表单中不包含buuton的表单元素
                        if(this.value == '') {   
                            var text=$(this).parent().prev().text().replace("：","").replace(" ","");//取出与此元素上一级的左边元素的文本，并替换空格和":"
                            //layer.alert("“"+text+"”不能为空值",1);
                            $(this).nextAll("span").html("<i class='icon-remove bigger-110 red'></i>"+text+"不能为空.");//重写与此元素同级中的SPAN元素
                            this.focus();
                           isPass = false;
                            return false;//跳出each
                        }else{
                         $(this).nextAll("span").html("*");//重写与此元素同级中的SPAN元素为*
                       }
                    });
                    return isPass; 
                }
                       /*
                        * 函数名:PostData();
                        * 功能：提交表单;
                        * 参数：isshow,不否显示alert;form,表单名;url,提交POST的地址(main以后的部分).
                        */
                var PostData=function(isshow,form,url){   
                    var data_url= '<?php echo site_url("main") ?>';
                    var json1 = $('#'+form).serializeArray() //序列化为JSON对象而非JSON字符串
                    $.ajax({
                        type: "POST",
                        url: data_url+'/'+url,
                        data: json1,
                        timeout: 1500,
                        success: function(data){  
                            if(isshow){layer.alert( data.msg,1);}else{ layer.load('正在加载中。。',1,1);}
                             $('#fiid').val(data.fiid);
                             $('#rid').val(data.rid);
                             $('#prid').val(data.prid);
                             $('#fiid2').val(data.fiid);
                             $('#rid2').val(data.rid);
                             $('#prid2').val(data.prid);
                             $('#download_1_1_2').attr('href','<?php echo site_url("main/exportToExcel") ?>'+'/'+data.rid); 
                         },
                        error: function(){ 
                           layer.alert(" 数据提交失败,请检查你的网络!",5)
                         },//error
                        dataType: "json",
                        }); //AJAX发送数据      
                   }  
                  var GetDateStr=function (AddDayCount)
                    {
                    var dd = new Date();
                    dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
                    var y = dd.getFullYear();
                    var m = dd.getMonth()+1;//获取当前月份的日期
                    var d = dd.getDate();
                    return y+"/"+m+"/"+d;
                    }    
                </script>>
                <script type="text/javascript">
                   $("#pcode").click(function(){
                    $.layer({
                        type :2,
                        title : '添加项目',
                        iframe : {src : '<?php echo site_url("main/addPcode") ?>'},
                        maxmin: true,
                        area : ['620px' , '410px'], 
                        close : function(index){                         
                         var str_in=layer.getChildFrame('#pcode_addrst', index).val();//返回值
                         var del_tag=0,add_tag=0;
                         var str_that=$('#pcode').val();//当前值                     
                         var arr=new Array(); //定义数组                        
                         if(str_in!=""){arr=str_in.split(',');}//注split可以用字符或字符串分割
                        // alert(arr.length);
                         for(var i=0;i<arr.length;i++) {
                          if(str_that.indexOf(arr[i])==-1){
                                  str_that+=arr[i]+",";   //如果在当前值中不存在此项目编码，则在末尾添加
                                  add_tag++;
                         }else{
                          del_tag++;   
                       }
                       $('#pcode').val(str_that); 
                       }
                       if(del_tag>0&&str_in!=""){layer.alert("己成功添加"+add_tag+"个项目，自动过滤了"+del_tag+"条重复项！",1);  }
                      }
                    });  
                  });     
                   $("#pcode").mousemove(function(){
                     layer.tips('点击此控件会弹出项目查询窗口，然后在查询结果中勾选添加，关闭窗口后会返回项目编码！', this, {
                        style: ['background-color:#78BA32; color:#fff', '#78BA32'],
                        maxWidth:185,
                        time: 10,
                        closeBtn:[0, true]
                    });
                   });
                  $("#save_1_1_1").click(function(){   
                     if(check_1_1_1()){                    
                      PostData(true,'form_1_1_1','set_save_1_1_1');
                     }
                  }); 
                  $("#next_1_1_1").click(function(){
                     if(check_1_1_1()){
                         PostData(false,'form_1_1_1','set_save_1_1_1');
                        $('#myTab li:eq(1) a').tab('show');                                             
                     }                      
                     });
                  $("#last_1_1_2").click(function(){
                       $('#myTab a:first').tab('show');
                    });
                   $("#print_1_1_2").click(function(){                    
                      if(check_1_1_2()){                    
                        PostData(true,'form_1_1_2','set_save_1_1_2/P');
                       }
                        });
                   $("#save_1_1_2").click(function(){                                    
                        PostData(true,'form_1_1_2','set_save_1_1_2/S');                     
                        });
                  $("#next_1_1_2").click(function(){
                       if(check_1_1_2()){                    
                         PostData(false,'form_1_1_2','set_save_1_1_2/N');
                         $('#myTab li:eq(2) a').tab('show'); 
                       }
                     
                     });
                   $("#last_1_1_3").click(function(){
                       $('#myTab li:eq(1) a').tab('show');
                    });
                   $("#next_1_1_3").click(function(){
                         
                     });
                  </script>
                <script type="text/javascript">
                $(function($) {
			$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
			     $(this).next().focus();
			        });
                           });  
                        $('#id-date-range-picker-1').daterangepicker(
                              { 
                                format: 'YYYY/MM/DD',
                                startDate: GetDateStr(0), //今天日期
                                endDate: GetDateStr(7),  //一周后日期
                                separator:'-',
                                locale: {
                                  applyLabel: '确定',
                                  cancelLabel: '取消',
                                  fromLabel: '从',
                                  toLabel: '到',
                                  customRangeLabel: 'Custom',
                                  daysOfWeek: ['日', '一', '二', '三', '四', '五','六'],
                                  monthNames: ['一月', '二月', '三月', '四月', '五月',
                                  '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                                 }        
                              }
                            );
                         $('#id-date-range-picker-1').val( GetDateStr(0)+"-"+ GetDateStr(7));
                          $('.date-picker').datepicker({autoclose:true}).next().on(ace.click_event, function(){
			      $(this).prev().focus();
				});                                  
                </script>
             <script type="text/javascript">
            // Custom example logic
            var uploader = new plupload.Uploader({
                    runtimes : 'html5,flash,silverlight,html4',
                    max_file_size : '1024mb',  // 文件上传最大限制。
                    chunk_size : '2mb',  // 上传分块每块的大小，这个值小于服务器最大上传限制的值即可。（文件总大小/chunk_size = 分块数）。
                    browse_button : 'files_browser', // you can pass in id...
                    container: document.getElementById('tab_1_1_3'), // ... or DOM Element itself
                    resize : {width : 320, height : 240, quality : 90},  // 是否生成缩略图（仅对图片文件有效）。
                    url :'<?php echo site_url("main/set_upload") ?>',
                    flash_swf_url : 'assets/js/plupload/Moxie.swf',
                    silverlight_xap_url :' assets/js/plupload/Moxie.xap',
                    multipart : true,
                    unique_names: true, // 对上传的文件名进行唯一性处理
                    filters : {
                            max_file_size : '1024mb',
                            mime_types: [
                                    {title : "Image files", extensions : "jpg,gif,png"},
                                    {title : "Zip files", extensions : "zip,rar,iso,7z"}
                            ]
                    },
                    init: {
                            PostInit: function() {                                   
                                    document.getElementById('files_uploads').onclick = function() {
                                            uploader.start();
                                            return false;
                                    };
                            },
                            BeforeUpload:function(up,file){
                                 uploader.setOption("multipart_params",{"prid": $('#prid2').val(),"type":"入场申请扫描件","oldFileName":file.name,"fileSize":file.size});
                             },
                            FilesAdded: function(up, files) {
                                    plupload.each(files, function(file) {                                           
                                             $("#files_lists").append("<tr id='"+file.id+"tr'><td>入场申请扫描件</td><td>"+file.name+"</td><td>"+plupload.formatSize(file.size)+"</td><td><button class='btn btn-xs btn-success' id='"+file.id+"filesbtn' onclick=del('"+file.id+"')><i class='icon-trash bigger-120'></i></button> </td><td id='"+file.id+"_progress'></td></tr>");
                                    });
                            },
                            UploadProgress: function(up, file) {
                                   $("#"+file.id+"_progress").html("<span>"+ file.percent + "%</span>");
                                
                            },
                            FileUploaded: function(up,file,res){ //文件上传成功的时候触发
                                $("#"+file.id+"filesbtn").remove();  
                            },   
                             UploadComplete: function(up,file){
                                layer.alert(file.length+"个文件上传成功，请提交下一步！",1);   
                             },
                            Error: function(up, err) {
                                layer.alert("上传出错: "+ err.code + ": " + err.message,5);
                            }
                    }
            });
            function del(id){
                uploader.removeFile(id);
                $("#"+id+"tr").remove();            
            }
            uploader.init();
            </script>
               <script type="text/javascript">//激活首TAB
                  $(function () {
                    $('#myTab a:first').tab('show');
                    $('#myTab a').click(function (e) {
                      e.preventDefault();//阻止a链接的跳转行为
                      $(this).tab('show');//显示当前选中的链接及关联的content
                    })
                  })
                </script> 	
</body>
</html>
